<?php
define('ROOT_PATH','../');
define('TEMPLATE_DIR','gmer/');
require_once(ROOT_PATH.'code/bean/config.inc.php');
require_once(ROOT_PATH.'code/class/gmer/class.admin_user.php');
require_once(ROOT_PATH.'code/class/gmer/class.admin_op_ques.php');
require_once(ROOT_PATH.'code/bean/smarty.config.inc.php');
require_once(ROOT_PATH.'code/bean/db_config.inc.php');
$user=new gmer_user();
$session=check_login('admin/index.php');
if($user->session) {
	
	$game_id=-1;	
	if(isset($_GET['set_game_id'])) {
		if($_GET['set_game_id']!='-1') {
			$game_id=$_GET['set_game_id'];
		}
	}else {
		if(isset($_COOKIE['set_game_id'])) {
			if($_COOKIE['set_game_id']!=-1) {
				$game_id=$_COOKIE['set_game_id'];
			}
		}
	}
	$tpl->assign('game_id',$game_id);	
	
	$opQues=new opQues();
	$tpl->assign('user',$user);	
    $tpl->assign('ques_info',$opQues);
	$tpl->assign('file_gm_info','tpl/gm_user_info.tpl');
	$tpl->display('op_base_1.html');
}else {
	$tpl->display('gm_login.html');
}
?>